package entities.kinds;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true", cacheable = "true")
public class Request {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key id;

	@Persistent
	private String from;

	@Persistent
	private String to;

	@Persistent
	private String msg;

	@Persistent
	private boolean read;

	@Persistent
	private String fromDec;

	@Persistent
	private String toDec;

	public Request() {
	}

	public Request(String from, String to) {
		this.setFrom(from);
		this.setTo(to);
		this.setRead(false);
	}

	public Key getId() {
		return id;
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String login) {
		this.from = login;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String password) {
		this.to = password;
	}

	public boolean isRead() {
		return read;
	}

	public void setRead(boolean read) {
		this.read = read;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getFromDec() {
		return fromDec;
	}

	public void setFromDec(String fromDec) {
		this.fromDec = fromDec;
	}

	public String getToDec() {
		return toDec;
	}

	public void setToDec(String toDec) {
		this.toDec = toDec;
	}

}
